notebook: Don't limit motion notify framerate
authorBenjamin Otte <otte@redhat.com>
Thu, 7 Jan 2016 14:54:58 +0000 (15:54 +0100)
committerBenjamin Otte <otte@redhat.com>
Mon, 11 Jan 2016 16:06:46 +0000 (17:06 +0100)
We have a frameclock for that these days.

In particular, this limiting worked at 45fps when monitors are all 60fps.

gtk/gtknotebook.c

index 7a150090657a6a8e43f651e049330ad54c32c6b9..04455f6d78823ba776a2fa04e94b702b5a4709f2 100644 (file)
 #define SCROLL_DELAY_FACTOR   5
 #define SCROLL_THRESHOLD      12
 #define DND_THRESHOLD_MULTIPLIER 4
-#define FRAMES_PER_SECOND     45
-#define MSECS_BETWEEN_UPDATES (1000 / FRAMES_PER_SECOND)
 
 #define TIMEOUT_INITIAL  500
 #define TIMEOUT_REPEAT    50
@@ -203,7 +201,6 @@ struct _GtkNotebookPrivate
   GList         *switch_tab;
 
   guint32        timer;
-  guint32        timestamp;
 
   guint          button             : 2;
   guint          child_has_focus    : 1;
@@ -3298,11 +3295,6 @@ gtk_notebook_motion_notify (GtkWidget      *widget,
       stop_scrolling (notebook);
     }
 
-  if (event->time < priv->timestamp + MSECS_BETWEEN_UPDATES)
-    return FALSE;
-
-  priv->timestamp = event->time;
-
   tab_prelight (notebook, (GdkEvent *)event);
 
   /* While animating the move, event->x is relative to the flying tab